<template>
  <div>
    <div class="parent">
      <img :src="img" alt="">
      <button class="del" @click="del">X</button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'BigImg',
  props: {
    img: {
      type: String,
      default: ''
    }
  },
  methods: {
    del() {
      this.$store.dispatch('showBigImg', {
        imgUrl: '',
        tag: false
      })
    }
  }
}
</script>

<style lang="scss" scoped>
img {
  width: 800px;
  height: 560px;
}
.parent {
  position: relative;
}
.del {
  position: absolute;
  right: 2%;
  top: 2%;
  z-index: 9999;
  padding: 10px;
  border: none;
  background: none;
  color: #fff;
  font-size: 30px;
}
</style>